/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.munchkinquest.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author stephen
 */
@Entity
@Table(name = "STEP", catalog = "", schema = "APP")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Step.findAll", query = "SELECT s FROM Step s"),
    @NamedQuery(name = "Step.findById", query = "SELECT s FROM Step s WHERE s.id = :id"),
    @NamedQuery(name = "Step.findByInstructionid", query = "SELECT s FROM Step s WHERE s.instructionid = :instructionid"),
    @NamedQuery(name = "Step.findBySteptypeid", query = "SELECT s FROM Step s WHERE s.steptypeid = :steptypeid"),
    @NamedQuery(name = "Step.findByNavtextid", query = "SELECT s FROM Step s WHERE s.navtextid = :navtextid")})
public class Step implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID")
    private Long id;
    @Basic(optional = false)
    @NotNull
    @Column(name = "INSTRUCTIONID")
    private long instructionid;
    @Basic(optional = false)
    @NotNull
    @Column(name = "STEPTYPEID")
    private long steptypeid;
    @Column(name = "NAVTEXTID")
    private Long navtextid;

    public Step() {
    }

    public Step(Long id) {
        this.id = id;
    }

    public Step(Long id, long instructionid, long steptypeid) {
        this.id = id;
        this.instructionid = instructionid;
        this.steptypeid = steptypeid;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public long getInstructionid() {
        return instructionid;
    }

    public void setInstructionid(long instructionid) {
        this.instructionid = instructionid;
    }

    public long getSteptypeid() {
        return steptypeid;
    }

    public void setSteptypeid(long steptypeid) {
        this.steptypeid = steptypeid;
    }

    public Long getNavtextid() {
        return navtextid;
    }

    public void setNavtextid(Long navtextid) {
        this.navtextid = navtextid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Step)) {
            return false;
        }
        Step other = (Step) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.Step[ id=" + id + " ]";
    }
    
}
